#ifndef AUXILIAR_H
#define AUXILIAR_H

#include "includes.h"
#include "Data_Transfer.h"

typedef mMeshEntityContainer::iter iterall;

/*! \brief: Receives the coordinates of a triangle and calculates its area.
   * \param ptn1 coordinate from vertice 1
   * \param ptn2 coordinate from vertice 2
   * \param ptn3 coordinate from vertice 3
   */

double F_area(const double *ptn1, const double *ptn2, const double *ptn3);

/*! \brief: Receives the coordinates of a tetraedron and calculates its volume.
   * \param ptn1 coordinate from vertice 1
   * \param ptn2 coordinate from vertice 2
   * \param ptn3 coordinate from vertice 3
   * \param ptn4 coordinate from vertice 4
   */

double R_Volume(const double *ptn1, const double *ptn2, const double *ptn3, const double *ptn4);

/*! \brief: load meshes.
   * \param m1 base mesh 
   * \param m2 mesh to be interpolated
   * \param filename1
   * \param filmename2
   */

void loadMeshes(pMesh m1, pMesh m2, const char* filename1, const char* filename2);

/*! \brief: Generate a scalar field according to some function.
   * \param theMesh mesh where the scalar field is generated.
   * \param data_transfer DataTransfer object.
   * \param option integer related to the kind of function that generates the field.
   * \param DataID the field's name.
   */

void generateScalarField(pMesh theMesh, DataTransfer data_transfer,int option);

void calculate_Error(pMesh theMesh, DataTransfer data_transfer, int option);

#endif//AUXILIAR_H 
